//
//  SVRootScrollView.h
//  SlideView
//
//  Created by Chen Yaoqiang on 13-12-27.
//  Copyright (c) 2013年 Chen Yaoqiang. All rights reserved.
//

#import <UIKit/UIKit.h>

@protocol SVRootScrollViewDelegate <NSObject>

-(void)svRootScrollViewDidSelectPageWithTitle:(NSString *)title;

@end

@interface SVRootScrollView : UIScrollView <UIScrollViewDelegate>
{
    NSArray *viewNameArray;
    CGFloat userContentOffsetX;
    BOOL isLeftScroll;
}
@property (nonatomic, retain) NSArray *pageTitleArray;  //页面标题
@property (nonatomic, retain) NSArray *viewControllerArray;
@property (nonatomic, weak) NSObject<SVRootScrollViewDelegate> *svrDelegate;

@property (nonatomic, assign) BOOL ifDragging;//是否正在拖拉页面

+ (SVRootScrollView *)shareInstance;

- (void)initWithViewControllers;

//刷新选中的页面标题
- (void)refleshPageTitle;

- (void)adjustTopScrollViewButton;

+ (void)setSelectedIndex:(NSInteger)index;

@end
